#ifndef __OLED_H
#define __OLED_H 

#include <arduino.h>

//-----------------OLED�˿ڶ���---------------- 

#define OLED_SCL_Clr() digitalWrite(25, LOW)	//SCL
#define OLED_SCL_Set() digitalWrite(25, HIGH);

#define OLED_SDA_Clr() digitalWrite(26, LOW)//SDA
#define OLED_SDA_Set() digitalWrite(26, HIGH);

#define OLED_RES_Clr() digitalWrite(27, LOW)//RES
#define OLED_RES_Set() digitalWrite(27, HIGH); 

#define OLED_DC_Clr()  digitalWrite(14, LOW)	//DC
#define OLED_DC_Set()  digitalWrite(14, HIGH);
 		     
#define OLED_CS_Clr()  digitalWrite(12, LOW);//CS
#define OLED_CS_Set()  digitalWrite(12, HIGH);
																												
/*------------------------------- endif ------------------------------------*/


#define OLED_CMD  0	//д����
#define OLED_DATA 1	//д����

void OLED_ClearPoint(uint8_t x,uint8_t y);
void OLED_ColorTurn(uint8_t i);
void OLED_DisplayTurn(uint8_t i);
void OLED_WR_Byte(uint8_t dat,uint8_t mode);
void OLED_DisPlay_On(void);
void OLED_DisPlay_Off(void);
void OLED_Refresh(void);
void OLED_Clear(void);
void OLED_DrawPoint(uint8_t x,uint8_t y,uint8_t t);
void OLED_DrawLine(uint8_t x1,uint8_t y1,uint8_t x2,uint8_t y2,uint8_t mode);
void OLED_DrawCircle(uint8_t x,uint8_t y,uint8_t r);
void OLED_ShowChar(uint8_t x,uint8_t y,uint8_t chr,uint8_t size1,uint8_t mode);
void OLED_ShowChar6x8(uint8_t x,uint8_t y,uint8_t chr,uint8_t mode);
void OLED_ShowString(uint8_t x,uint8_t y,const char *chr,uint8_t size1,uint8_t mode);
void OLED_ShowNum(uint8_t x,uint8_t y,uint32_t num,uint8_t len,uint8_t size1,uint8_t mode);
void OLED_ShowSNum(uint8_t x,uint8_t y,int num,uint8_t len,uint8_t size1,uint8_t mode);//��ʾ���и���������
void OLED_ShowFNum(uint8_t x,uint8_t y,float num,uint8_t len,uint8_t size1,uint8_t mode);//��ʾ���и�����С�� 1λ
void OLED_ShowChinese(uint8_t x,uint8_t y,uint8_t num,uint8_t size1,uint8_t mode);
void OLED_ScrollDisplay(uint8_t num,uint8_t space,uint8_t mode);
void OLED_ShowPicture(uint8_t x,uint8_t y,uint8_t sizex,uint8_t sizey,uint8_t BMP[],uint8_t mode);
void OLED_Init(void);
#endif

